home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 19
/
CU Amiga Magazine's Super CD-ROM 19 (1998)(EMAP Images)(GB)[!][issue 1998-02].iso
/
CUCD
/
Readers
/
Gui4Cli
/
Docs
/
Tutorials
/
TextIn.gc
< prev
next >
Wrap
Text File
|
1997-12-02
|
2KB
|
53 lines
G4C
WinBig -1 -1 350 100 "TextIn.gc"
WinType 11110001
usetopaz
BOX 0 0 0 0 OUT RIDGE
xonLoad
GuiOpen TextIn.gc
setgad textin.gc 1 on ; enable the 1st xtextin gadget when window opens
; Not needed, but makes it easier for the user..
xonClose
GuiQuit TextIn.gc
Text 140 2 100 12 'TextIn' 6 NOBOX ; Headings
Text 10 12 100 12 'Enter your ..' 14 NOBOX
; ---- Arguments required for a TextIn command :
; ST = StartingText BufL = BufferLength
; Note that the 'Title' appears outside the box, and is really a
; label, unlike xButton, in which 'Title' appears IN the box.
; L T W H Title Var ST BufL
; | | | | | | | |
xTextIn 100 30 200 14 'First name' nam1 '' 32
gadid 1
setgad textin.gc 2 on ; we do this to enable the next gadget as soon
; as <enter> is pressed on this one..
xTextIn 100 50 200 14 'Surname' nam2 '' 32
gadid 2
; The following indented lines are all carried out as soon as you
; press <Return> after entering a surname.
; ---- Arranging the two names to follow the greeting
appvar nam1 ' ' ; Append a space
appvar nam1 $nam2 ; Append the second name
; The variable nam1 now contains nam1 and nam2
setvar Greeting 'Hi there, ' ; Set the greeting
appvar Greeting $nam1 ; Append the names
Update TextIn.gc 3 $Greeting ; Update the text
; -------- A text gadget to hold the output
Text 10 70 300 14 '' 128 NOBOX
Gadid 3